Left Termination of the query pattern qs_in_2(g, a) w.r.t. the given Prolog program could successfully be proven:



Prolog
  ↳ PrologToPiTRSProof

Clauses:

qs(.(X, Xs), Ys) :- ','(part(X, Xs, Littles, Bigs), ','(qs(Littles, Ls), ','(qs(Bigs, Bs), app(Ls, .(X, Bs), Ys)))).
qs([], []).
part(X, .(Y, Xs), .(Y, Ls), Bs) :- ','(gt(X, Y), part(X, Xs, Ls, Bs)).
part(X, .(Y, Xs), Ls, .(Y, Bs)) :- ','(le(X, Y), part(X, Xs, Ls, Bs)).
part(X, [], [], []).
app(.(X, Xs), Ys, .(X, Zs)) :- app(Xs, Ys, Zs).
app([], Ys, Ys).
gt(s(X), s(Y)) :- gt(X, Y).
gt(s(0), 0).
le(s(X), s(Y)) :- le(X, Y).
le(0, s(0)).
le(0, 0).

Queries:

qs(g,a).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
qs_in: (b,f)
part_in: (b,b,f,f)
gt_in: (b,b)
le_in: (b,b)
app_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(0), 0) → gt_out_gg(s(0), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, gt_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(0)) → le_out_gg(0, s(0))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U7_ggaa(X, Y, Xs, Ls, Bs, le_out_gg(X, Y)) → U8_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U8_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
qs_in_ga([], []) → qs_out_ga([], [])
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U9_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
app_in_gga([], Ys, Ys) → app_out_gga([], Ys, Ys)
U9_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
gt_in_gg(x1, x2)  =  gt_in_gg(x1, x2)
s(x1)  =  s(x1)
U10_gg(x1, x2, x3)  =  U10_gg(x3)
0  =  0
gt_out_gg(x1, x2)  =  gt_out_gg
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x1, x2, x3, x6)
le_in_gg(x1, x2)  =  le_in_gg(x1, x2)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
le_out_gg(x1, x2)  =  le_out_gg
U8_ggaa(x1, x2, x3, x4, x5, x6)  =  U8_ggaa(x2, x6)
[]  =  []
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x5)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(0), 0) → gt_out_gg(s(0), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, gt_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(0)) → le_out_gg(0, s(0))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U7_ggaa(X, Y, Xs, Ls, Bs, le_out_gg(X, Y)) → U8_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U8_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
qs_in_ga([], []) → qs_out_ga([], [])
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U9_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
app_in_gga([], Ys, Ys) → app_out_gga([], Ys, Ys)
U9_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
gt_in_gg(x1, x2)  =  gt_in_gg(x1, x2)
s(x1)  =  s(x1)
U10_gg(x1, x2, x3)  =  U10_gg(x3)
0  =  0
gt_out_gg(x1, x2)  =  gt_out_gg
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x1, x2, x3, x6)
le_in_gg(x1, x2)  =  le_in_gg(x1, x2)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
le_out_gg(x1, x2)  =  le_out_gg
U8_ggaa(x1, x2, x3, x4, x5, x6)  =  U8_ggaa(x2, x6)
[]  =  []
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x5)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

QS_IN_GA(.(X, Xs), Ys) → U1_GA(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
QS_IN_GA(.(X, Xs), Ys) → PART_IN_GGAA(X, Xs, Littles, Bigs)
PART_IN_GGAA(X, .(Y, Xs), .(Y, Ls), Bs) → U5_GGAA(X, Y, Xs, Ls, Bs, gt_in_gg(X, Y))
PART_IN_GGAA(X, .(Y, Xs), .(Y, Ls), Bs) → GT_IN_GG(X, Y)
GT_IN_GG(s(X), s(Y)) → U10_GG(X, Y, gt_in_gg(X, Y))
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
U5_GGAA(X, Y, Xs, Ls, Bs, gt_out_gg(X, Y)) → U6_GGAA(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
U5_GGAA(X, Y, Xs, Ls, Bs, gt_out_gg(X, Y)) → PART_IN_GGAA(X, Xs, Ls, Bs)
PART_IN_GGAA(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_GGAA(X, Y, Xs, Ls, Bs, le_in_gg(X, Y))
PART_IN_GGAA(X, .(Y, Xs), Ls, .(Y, Bs)) → LE_IN_GG(X, Y)
LE_IN_GG(s(X), s(Y)) → U11_GG(X, Y, le_in_gg(X, Y))
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
U7_GGAA(X, Y, Xs, Ls, Bs, le_out_gg(X, Y)) → U8_GGAA(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
U7_GGAA(X, Y, Xs, Ls, Bs, le_out_gg(X, Y)) → PART_IN_GGAA(X, Xs, Ls, Bs)
U1_GA(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_GA(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
U1_GA(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → QS_IN_GA(Littles, Ls)
U2_GA(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_GA(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U2_GA(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → QS_IN_GA(Bigs, Bs)
U3_GA(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_GA(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
U3_GA(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → APP_IN_GGA(Ls, .(X, Bs), Ys)
APP_IN_GGA(.(X, Xs), Ys, .(X, Zs)) → U9_GGA(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
APP_IN_GGA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_GGA(Xs, Ys, Zs)

The TRS R consists of the following rules:

qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(0), 0) → gt_out_gg(s(0), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, gt_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(0)) → le_out_gg(0, s(0))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U7_ggaa(X, Y, Xs, Ls, Bs, le_out_gg(X, Y)) → U8_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U8_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
qs_in_ga([], []) → qs_out_ga([], [])
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U9_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
app_in_gga([], Ys, Ys) → app_out_gga([], Ys, Ys)
U9_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
gt_in_gg(x1, x2)  =  gt_in_gg(x1, x2)
s(x1)  =  s(x1)
U10_gg(x1, x2, x3)  =  U10_gg(x3)
0  =  0
gt_out_gg(x1, x2)  =  gt_out_gg
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x1, x2, x3, x6)
le_in_gg(x1, x2)  =  le_in_gg(x1, x2)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
le_out_gg(x1, x2)  =  le_out_gg
U8_ggaa(x1, x2, x3, x4, x5, x6)  =  U8_ggaa(x2, x6)
[]  =  []
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x5)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
APP_IN_GGA(x1, x2, x3)  =  APP_IN_GGA(x1, x2)
QS_IN_GA(x1, x2)  =  QS_IN_GA(x1)
PART_IN_GGAA(x1, x2, x3, x4)  =  PART_IN_GGAA(x1, x2)
U6_GGAA(x1, x2, x3, x4, x5, x6)  =  U6_GGAA(x2, x6)
LE_IN_GG(x1, x2)  =  LE_IN_GG(x1, x2)
U5_GGAA(x1, x2, x3, x4, x5, x6)  =  U5_GGAA(x1, x2, x3, x6)
U9_GGA(x1, x2, x3, x4, x5)  =  U9_GGA(x1, x5)
U8_GGAA(x1, x2, x3, x4, x5, x6)  =  U8_GGAA(x2, x6)
U7_GGAA(x1, x2, x3, x4, x5, x6)  =  U7_GGAA(x1, x2, x3, x6)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x4)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x1, x4, x5)
U4_GA(x1, x2, x3, x4)  =  U4_GA(x4)
U10_GG(x1, x2, x3)  =  U10_GG(x3)
U11_GG(x1, x2, x3)  =  U11_GG(x3)
GT_IN_GG(x1, x2)  =  GT_IN_GG(x1, x2)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x1, x4, x5)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

QS_IN_GA(.(X, Xs), Ys) → U1_GA(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
QS_IN_GA(.(X, Xs), Ys) → PART_IN_GGAA(X, Xs, Littles, Bigs)
PART_IN_GGAA(X, .(Y, Xs), .(Y, Ls), Bs) → U5_GGAA(X, Y, Xs, Ls, Bs, gt_in_gg(X, Y))
PART_IN_GGAA(X, .(Y, Xs), .(Y, Ls), Bs) → GT_IN_GG(X, Y)
GT_IN_GG(s(X), s(Y)) → U10_GG(X, Y, gt_in_gg(X, Y))
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
U5_GGAA(X, Y, Xs, Ls, Bs, gt_out_gg(X, Y)) → U6_GGAA(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
U5_GGAA(X, Y, Xs, Ls, Bs, gt_out_gg(X, Y)) → PART_IN_GGAA(X, Xs, Ls, Bs)
PART_IN_GGAA(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_GGAA(X, Y, Xs, Ls, Bs, le_in_gg(X, Y))
PART_IN_GGAA(X, .(Y, Xs), Ls, .(Y, Bs)) → LE_IN_GG(X, Y)
LE_IN_GG(s(X), s(Y)) → U11_GG(X, Y, le_in_gg(X, Y))
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
U7_GGAA(X, Y, Xs, Ls, Bs, le_out_gg(X, Y)) → U8_GGAA(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
U7_GGAA(X, Y, Xs, Ls, Bs, le_out_gg(X, Y)) → PART_IN_GGAA(X, Xs, Ls, Bs)
U1_GA(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_GA(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
U1_GA(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → QS_IN_GA(Littles, Ls)
U2_GA(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_GA(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U2_GA(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → QS_IN_GA(Bigs, Bs)
U3_GA(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_GA(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
U3_GA(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → APP_IN_GGA(Ls, .(X, Bs), Ys)
APP_IN_GGA(.(X, Xs), Ys, .(X, Zs)) → U9_GGA(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
APP_IN_GGA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_GGA(Xs, Ys, Zs)

The TRS R consists of the following rules:

qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(0), 0) → gt_out_gg(s(0), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, gt_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(0)) → le_out_gg(0, s(0))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U7_ggaa(X, Y, Xs, Ls, Bs, le_out_gg(X, Y)) → U8_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U8_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
qs_in_ga([], []) → qs_out_ga([], [])
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U9_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
app_in_gga([], Ys, Ys) → app_out_gga([], Ys, Ys)
U9_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
gt_in_gg(x1, x2)  =  gt_in_gg(x1, x2)
s(x1)  =  s(x1)
U10_gg(x1, x2, x3)  =  U10_gg(x3)
0  =  0
gt_out_gg(x1, x2)  =  gt_out_gg
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x1, x2, x3, x6)
le_in_gg(x1, x2)  =  le_in_gg(x1, x2)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
le_out_gg(x1, x2)  =  le_out_gg
U8_ggaa(x1, x2, x3, x4, x5, x6)  =  U8_ggaa(x2, x6)
[]  =  []
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x5)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
APP_IN_GGA(x1, x2, x3)  =  APP_IN_GGA(x1, x2)
QS_IN_GA(x1, x2)  =  QS_IN_GA(x1)
PART_IN_GGAA(x1, x2, x3, x4)  =  PART_IN_GGAA(x1, x2)
U6_GGAA(x1, x2, x3, x4, x5, x6)  =  U6_GGAA(x2, x6)
LE_IN_GG(x1, x2)  =  LE_IN_GG(x1, x2)
U5_GGAA(x1, x2, x3, x4, x5, x6)  =  U5_GGAA(x1, x2, x3, x6)
U9_GGA(x1, x2, x3, x4, x5)  =  U9_GGA(x1, x5)
U8_GGAA(x1, x2, x3, x4, x5, x6)  =  U8_GGAA(x2, x6)
U7_GGAA(x1, x2, x3, x4, x5, x6)  =  U7_GGAA(x1, x2, x3, x6)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x4)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x1, x4, x5)
U4_GA(x1, x2, x3, x4)  =  U4_GA(x4)
U10_GG(x1, x2, x3)  =  U10_GG(x3)
U11_GG(x1, x2, x3)  =  U11_GG(x3)
GT_IN_GG(x1, x2)  =  GT_IN_GG(x1, x2)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x1, x4, x5)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 5 SCCs with 11 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APP_IN_GGA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_GGA(Xs, Ys, Zs)

The TRS R consists of the following rules:

qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(0), 0) → gt_out_gg(s(0), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, gt_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(0)) → le_out_gg(0, s(0))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U7_ggaa(X, Y, Xs, Ls, Bs, le_out_gg(X, Y)) → U8_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U8_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
qs_in_ga([], []) → qs_out_ga([], [])
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U9_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
app_in_gga([], Ys, Ys) → app_out_gga([], Ys, Ys)
U9_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
gt_in_gg(x1, x2)  =  gt_in_gg(x1, x2)
s(x1)  =  s(x1)
U10_gg(x1, x2, x3)  =  U10_gg(x3)
0  =  0
gt_out_gg(x1, x2)  =  gt_out_gg
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x1, x2, x3, x6)
le_in_gg(x1, x2)  =  le_in_gg(x1, x2)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
le_out_gg(x1, x2)  =  le_out_gg
U8_ggaa(x1, x2, x3, x4, x5, x6)  =  U8_ggaa(x2, x6)
[]  =  []
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x5)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
APP_IN_GGA(x1, x2, x3)  =  APP_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APP_IN_GGA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_GGA(Xs, Ys, Zs)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
APP_IN_GGA(x1, x2, x3)  =  APP_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APP_IN_GGA(.(X, Xs), Ys) → APP_IN_GGA(Xs, Ys)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)

The TRS R consists of the following rules:

qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(0), 0) → gt_out_gg(s(0), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, gt_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(0)) → le_out_gg(0, s(0))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U7_ggaa(X, Y, Xs, Ls, Bs, le_out_gg(X, Y)) → U8_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U8_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
qs_in_ga([], []) → qs_out_ga([], [])
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U9_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
app_in_gga([], Ys, Ys) → app_out_gga([], Ys, Ys)
U9_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
gt_in_gg(x1, x2)  =  gt_in_gg(x1, x2)
s(x1)  =  s(x1)
U10_gg(x1, x2, x3)  =  U10_gg(x3)
0  =  0
gt_out_gg(x1, x2)  =  gt_out_gg
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x1, x2, x3, x6)
le_in_gg(x1, x2)  =  le_in_gg(x1, x2)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
le_out_gg(x1, x2)  =  le_out_gg
U8_ggaa(x1, x2, x3, x4, x5, x6)  =  U8_ggaa(x2, x6)
[]  =  []
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x5)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
LE_IN_GG(x1, x2)  =  LE_IN_GG(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)

The TRS R consists of the following rules:

qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(0), 0) → gt_out_gg(s(0), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, gt_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(0)) → le_out_gg(0, s(0))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U7_ggaa(X, Y, Xs, Ls, Bs, le_out_gg(X, Y)) → U8_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U8_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
qs_in_ga([], []) → qs_out_ga([], [])
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U9_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
app_in_gga([], Ys, Ys) → app_out_gga([], Ys, Ys)
U9_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
gt_in_gg(x1, x2)  =  gt_in_gg(x1, x2)
s(x1)  =  s(x1)
U10_gg(x1, x2, x3)  =  U10_gg(x3)
0  =  0
gt_out_gg(x1, x2)  =  gt_out_gg
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x1, x2, x3, x6)
le_in_gg(x1, x2)  =  le_in_gg(x1, x2)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
le_out_gg(x1, x2)  =  le_out_gg
U8_ggaa(x1, x2, x3, x4, x5, x6)  =  U8_ggaa(x2, x6)
[]  =  []
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x5)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
GT_IN_GG(x1, x2)  =  GT_IN_GG(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

PART_IN_GGAA(X, .(Y, Xs), .(Y, Ls), Bs) → U5_GGAA(X, Y, Xs, Ls, Bs, gt_in_gg(X, Y))
PART_IN_GGAA(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_GGAA(X, Y, Xs, Ls, Bs, le_in_gg(X, Y))
U7_GGAA(X, Y, Xs, Ls, Bs, le_out_gg(X, Y)) → PART_IN_GGAA(X, Xs, Ls, Bs)
U5_GGAA(X, Y, Xs, Ls, Bs, gt_out_gg(X, Y)) → PART_IN_GGAA(X, Xs, Ls, Bs)

The TRS R consists of the following rules:

qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(0), 0) → gt_out_gg(s(0), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, gt_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(0)) → le_out_gg(0, s(0))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U7_ggaa(X, Y, Xs, Ls, Bs, le_out_gg(X, Y)) → U8_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U8_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
qs_in_ga([], []) → qs_out_ga([], [])
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U9_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
app_in_gga([], Ys, Ys) → app_out_gga([], Ys, Ys)
U9_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
gt_in_gg(x1, x2)  =  gt_in_gg(x1, x2)
s(x1)  =  s(x1)
U10_gg(x1, x2, x3)  =  U10_gg(x3)
0  =  0
gt_out_gg(x1, x2)  =  gt_out_gg
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x1, x2, x3, x6)
le_in_gg(x1, x2)  =  le_in_gg(x1, x2)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
le_out_gg(x1, x2)  =  le_out_gg
U8_ggaa(x1, x2, x3, x4, x5, x6)  =  U8_ggaa(x2, x6)
[]  =  []
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x5)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
PART_IN_GGAA(x1, x2, x3, x4)  =  PART_IN_GGAA(x1, x2)
U5_GGAA(x1, x2, x3, x4, x5, x6)  =  U5_GGAA(x1, x2, x3, x6)
U7_GGAA(x1, x2, x3, x4, x5, x6)  =  U7_GGAA(x1, x2, x3, x6)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

PART_IN_GGAA(X, .(Y, Xs), .(Y, Ls), Bs) → U5_GGAA(X, Y, Xs, Ls, Bs, gt_in_gg(X, Y))
PART_IN_GGAA(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_GGAA(X, Y, Xs, Ls, Bs, le_in_gg(X, Y))
U7_GGAA(X, Y, Xs, Ls, Bs, le_out_gg(X, Y)) → PART_IN_GGAA(X, Xs, Ls, Bs)
U5_GGAA(X, Y, Xs, Ls, Bs, gt_out_gg(X, Y)) → PART_IN_GGAA(X, Xs, Ls, Bs)

The TRS R consists of the following rules:

gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(0), 0) → gt_out_gg(s(0), 0)
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(0)) → le_out_gg(0, s(0))
le_in_gg(0, 0) → le_out_gg(0, 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
gt_in_gg(x1, x2)  =  gt_in_gg(x1, x2)
s(x1)  =  s(x1)
U10_gg(x1, x2, x3)  =  U10_gg(x3)
0  =  0
gt_out_gg(x1, x2)  =  gt_out_gg
le_in_gg(x1, x2)  =  le_in_gg(x1, x2)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
le_out_gg(x1, x2)  =  le_out_gg
PART_IN_GGAA(x1, x2, x3, x4)  =  PART_IN_GGAA(x1, x2)
U5_GGAA(x1, x2, x3, x4, x5, x6)  =  U5_GGAA(x1, x2, x3, x6)
U7_GGAA(x1, x2, x3, x4, x5, x6)  =  U7_GGAA(x1, x2, x3, x6)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

U7_GGAA(X, Y, Xs, le_out_gg) → PART_IN_GGAA(X, Xs)
PART_IN_GGAA(X, .(Y, Xs)) → U5_GGAA(X, Y, Xs, gt_in_gg(X, Y))
U5_GGAA(X, Y, Xs, gt_out_gg) → PART_IN_GGAA(X, Xs)
PART_IN_GGAA(X, .(Y, Xs)) → U7_GGAA(X, Y, Xs, le_in_gg(X, Y))

The TRS R consists of the following rules:

gt_in_gg(s(X), s(Y)) → U10_gg(gt_in_gg(X, Y))
gt_in_gg(s(0), 0) → gt_out_gg
le_in_gg(s(X), s(Y)) → U11_gg(le_in_gg(X, Y))
le_in_gg(0, s(0)) → le_out_gg
le_in_gg(0, 0) → le_out_gg
U10_gg(gt_out_gg) → gt_out_gg
U11_gg(le_out_gg) → le_out_gg

The set Q consists of the following terms:

gt_in_gg(x0, x1)
le_in_gg(x0, x1)
U10_gg(x0)
U11_gg(x0)

We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

QS_IN_GA(.(X, Xs), Ys) → U1_GA(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
U1_GA(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → QS_IN_GA(Littles, Ls)
U1_GA(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_GA(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
U2_GA(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → QS_IN_GA(Bigs, Bs)

The TRS R consists of the following rules:

qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(0), 0) → gt_out_gg(s(0), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, gt_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(0)) → le_out_gg(0, s(0))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U7_ggaa(X, Y, Xs, Ls, Bs, le_out_gg(X, Y)) → U8_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U8_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
qs_in_ga([], []) → qs_out_ga([], [])
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U9_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
app_in_gga([], Ys, Ys) → app_out_gga([], Ys, Ys)
U9_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
gt_in_gg(x1, x2)  =  gt_in_gg(x1, x2)
s(x1)  =  s(x1)
U10_gg(x1, x2, x3)  =  U10_gg(x3)
0  =  0
gt_out_gg(x1, x2)  =  gt_out_gg
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x1, x2, x3, x6)
le_in_gg(x1, x2)  =  le_in_gg(x1, x2)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
le_out_gg(x1, x2)  =  le_out_gg
U8_ggaa(x1, x2, x3, x4, x5, x6)  =  U8_ggaa(x2, x6)
[]  =  []
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x5)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
QS_IN_GA(x1, x2)  =  QS_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x4)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x1, x4, x5)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ PiDPToQDPProof
QDP
                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

QS_IN_GA(.(X, Xs)) → U1_GA(X, part_in_ggaa(X, Xs))
U2_GA(X, Bigs, qs_out_ga(Ls)) → QS_IN_GA(Bigs)
U1_GA(X, part_out_ggaa(Littles, Bigs)) → U2_GA(X, Bigs, qs_in_ga(Littles))
U1_GA(X, part_out_ggaa(Littles, Bigs)) → QS_IN_GA(Littles)

The TRS R consists of the following rules:

qs_in_ga(.(X, Xs)) → U1_ga(X, part_in_ggaa(X, Xs))
part_in_ggaa(X, .(Y, Xs)) → U5_ggaa(X, Y, Xs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(gt_in_gg(X, Y))
gt_in_gg(s(0), 0) → gt_out_gg
U10_gg(gt_out_gg) → gt_out_gg
U5_ggaa(X, Y, Xs, gt_out_gg) → U6_ggaa(Y, part_in_ggaa(X, Xs))
part_in_ggaa(X, .(Y, Xs)) → U7_ggaa(X, Y, Xs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(le_in_gg(X, Y))
le_in_gg(0, s(0)) → le_out_gg
le_in_gg(0, 0) → le_out_gg
U11_gg(le_out_gg) → le_out_gg
U7_ggaa(X, Y, Xs, le_out_gg) → U8_ggaa(Y, part_in_ggaa(X, Xs))
part_in_ggaa(X, []) → part_out_ggaa([], [])
U8_ggaa(Y, part_out_ggaa(Ls, Bs)) → part_out_ggaa(Ls, .(Y, Bs))
U6_ggaa(Y, part_out_ggaa(Ls, Bs)) → part_out_ggaa(.(Y, Ls), Bs)
U1_ga(X, part_out_ggaa(Littles, Bigs)) → U2_ga(X, Bigs, qs_in_ga(Littles))
qs_in_ga([]) → qs_out_ga([])
U2_ga(X, Bigs, qs_out_ga(Ls)) → U3_ga(X, Ls, qs_in_ga(Bigs))
U3_ga(X, Ls, qs_out_ga(Bs)) → U4_ga(app_in_gga(Ls, .(X, Bs)))
app_in_gga(.(X, Xs), Ys) → U9_gga(X, app_in_gga(Xs, Ys))
app_in_gga([], Ys) → app_out_gga(Ys)
U9_gga(X, app_out_gga(Zs)) → app_out_gga(.(X, Zs))
U4_ga(app_out_gga(Ys)) → qs_out_ga(Ys)

The set Q consists of the following terms:

qs_in_ga(x0)
part_in_ggaa(x0, x1)
gt_in_gg(x0, x1)
U10_gg(x0)
U5_ggaa(x0, x1, x2, x3)
le_in_gg(x0, x1)
U11_gg(x0)
U7_ggaa(x0, x1, x2, x3)
U8_ggaa(x0, x1)
U6_ggaa(x0, x1)
U1_ga(x0, x1)
U2_ga(x0, x1, x2)
U3_ga(x0, x1, x2)
app_in_gga(x0, x1)
U9_gga(x0, x1)
U4_ga(x0)

We have to consider all (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


U1_GA(X, part_out_ggaa(Littles, Bigs)) → U2_GA(X, Bigs, qs_in_ga(Littles))
U1_GA(X, part_out_ggaa(Littles, Bigs)) → QS_IN_GA(Littles)
The remaining pairs can at least be oriented weakly.

QS_IN_GA(.(X, Xs)) → U1_GA(X, part_in_ggaa(X, Xs))
U2_GA(X, Bigs, qs_out_ga(Ls)) → QS_IN_GA(Bigs)
Used ordering: Polynomial interpretation [25]:

POL(.(x1, x2)) = 1 + x2   
POL(0) = 0   
POL(QS_IN_GA(x1)) = 1 + x1   
POL(U10_gg(x1)) = x1   
POL(U11_gg(x1)) = 1   
POL(U1_GA(x1, x2)) = 1 + x2   
POL(U1_ga(x1, x2)) = 0   
POL(U2_GA(x1, x2, x3)) = 1 + x2   
POL(U2_ga(x1, x2, x3)) = 0   
POL(U3_ga(x1, x2, x3)) = 0   
POL(U4_ga(x1)) = 0   
POL(U5_ggaa(x1, x2, x3, x4)) = 1 + x3 + x4   
POL(U6_ggaa(x1, x2)) = 1 + x2   
POL(U7_ggaa(x1, x2, x3, x4)) = 1 + x3 + x4   
POL(U8_ggaa(x1, x2)) = 1 + x2   
POL(U9_gga(x1, x2)) = 0   
POL([]) = 0   
POL(app_in_gga(x1, x2)) = 0   
POL(app_out_gga(x1)) = 0   
POL(gt_in_gg(x1, x2)) = 1   
POL(gt_out_gg) = 1   
POL(le_in_gg(x1, x2)) = 1   
POL(le_out_gg) = 1   
POL(part_in_ggaa(x1, x2)) = 1 + x2   
POL(part_out_ggaa(x1, x2)) = 1 + x1 + x2   
POL(qs_in_ga(x1)) = 0   
POL(qs_out_ga(x1)) = 0   
POL(s(x1)) = 0   

The following usable rules [17] were oriented:

U6_ggaa(Y, part_out_ggaa(Ls, Bs)) → part_out_ggaa(.(Y, Ls), Bs)
gt_in_gg(s(0), 0) → gt_out_gg
le_in_gg(0, 0) → le_out_gg
U8_ggaa(Y, part_out_ggaa(Ls, Bs)) → part_out_ggaa(Ls, .(Y, Bs))
U10_gg(gt_out_gg) → gt_out_gg
le_in_gg(0, s(0)) → le_out_gg
part_in_ggaa(X, []) → part_out_ggaa([], [])
U5_ggaa(X, Y, Xs, gt_out_gg) → U6_ggaa(Y, part_in_ggaa(X, Xs))
le_in_gg(s(X), s(Y)) → U11_gg(le_in_gg(X, Y))
U7_ggaa(X, Y, Xs, le_out_gg) → U8_ggaa(Y, part_in_ggaa(X, Xs))
part_in_ggaa(X, .(Y, Xs)) → U7_ggaa(X, Y, Xs, le_in_gg(X, Y))
part_in_ggaa(X, .(Y, Xs)) → U5_ggaa(X, Y, Xs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(gt_in_gg(X, Y))
U11_gg(le_out_gg) → le_out_gg



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ PiDPToQDPProof
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

QS_IN_GA(.(X, Xs)) → U1_GA(X, part_in_ggaa(X, Xs))
U2_GA(X, Bigs, qs_out_ga(Ls)) → QS_IN_GA(Bigs)

The TRS R consists of the following rules:

qs_in_ga(.(X, Xs)) → U1_ga(X, part_in_ggaa(X, Xs))
part_in_ggaa(X, .(Y, Xs)) → U5_ggaa(X, Y, Xs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(gt_in_gg(X, Y))
gt_in_gg(s(0), 0) → gt_out_gg
U10_gg(gt_out_gg) → gt_out_gg
U5_ggaa(X, Y, Xs, gt_out_gg) → U6_ggaa(Y, part_in_ggaa(X, Xs))
part_in_ggaa(X, .(Y, Xs)) → U7_ggaa(X, Y, Xs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(le_in_gg(X, Y))
le_in_gg(0, s(0)) → le_out_gg
le_in_gg(0, 0) → le_out_gg
U11_gg(le_out_gg) → le_out_gg
U7_ggaa(X, Y, Xs, le_out_gg) → U8_ggaa(Y, part_in_ggaa(X, Xs))
part_in_ggaa(X, []) → part_out_ggaa([], [])
U8_ggaa(Y, part_out_ggaa(Ls, Bs)) → part_out_ggaa(Ls, .(Y, Bs))
U6_ggaa(Y, part_out_ggaa(Ls, Bs)) → part_out_ggaa(.(Y, Ls), Bs)
U1_ga(X, part_out_ggaa(Littles, Bigs)) → U2_ga(X, Bigs, qs_in_ga(Littles))
qs_in_ga([]) → qs_out_ga([])
U2_ga(X, Bigs, qs_out_ga(Ls)) → U3_ga(X, Ls, qs_in_ga(Bigs))
U3_ga(X, Ls, qs_out_ga(Bs)) → U4_ga(app_in_gga(Ls, .(X, Bs)))
app_in_gga(.(X, Xs), Ys) → U9_gga(X, app_in_gga(Xs, Ys))
app_in_gga([], Ys) → app_out_gga(Ys)
U9_gga(X, app_out_gga(Zs)) → app_out_gga(.(X, Zs))
U4_ga(app_out_gga(Ys)) → qs_out_ga(Ys)

The set Q consists of the following terms:

qs_in_ga(x0)
part_in_ggaa(x0, x1)
gt_in_gg(x0, x1)
U10_gg(x0)
U5_ggaa(x0, x1, x2, x3)
le_in_gg(x0, x1)
U11_gg(x0)
U7_ggaa(x0, x1, x2, x3)
U8_ggaa(x0, x1)
U6_ggaa(x0, x1)
U1_ga(x0, x1)
U2_ga(x0, x1, x2)
U3_ga(x0, x1, x2)
app_in_gga(x0, x1)
U9_gga(x0, x1)
U4_ga(x0)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 2 less nodes.